<template>
  <div v-show="showT" id="print-iframe-ll" v-if="productFrom.baseData">
    <div
      style="
        display: flex;
        padding: 10px 0;
        align-items: center;
        margin: 10px 0;
      "
    >
      <div style="width: 25%" />
      <div
        style="
          flex: 1;
          text-align: center;
          font-size: 14px !important;
          letter-spacing: 10px;
          padding: 5px 0;
          border-bottom: 3px double #000;
        "
      >
        <div>申楷桢防伪科技技术有限公司&nbsp;</div>
        领料单
      </div>
      <div style="width: 25%; text-align: right">
        <div style="font-size: 12px">
          №. {{ productFrom.baseData.getMaterialBillNo }}
        </div>
      </div>
    </div>
    <div
      style="
        display: flex;
        padding: 10px 0;
        flex-wrap: wrap;
        line-height: 1.5em;
        font-size: 12px;
      "
    >
      <div style="width: 33%">
        领用机台: {{ productFrom.baseData.equipmentName }}
      </div>
      <div style="width: 33%">
        领用人员: {{ productFrom.baseData.getMaterialPersonName }}
      </div>
      <div style="width: 33%">
        领用日期: {{ productFrom.baseData.createDate }}
      </div>
      <div style="width: 33%">
        生产单号: {{ productFrom.baseData.produceTaskBillNo }}
      </div>
      <div style="width: 33%">
        产品名称: {{ productFrom.baseData.orderProductName }}
      </div>
    </div>
    <div
      style="border: 1px solid #000; overflow: hidden; box-sizing: border-box"
    >
      <div
        style="border-bottom: 1px solid #000; display: flex; font-size: 12px"
      >
        <div style="display: flex; flex: 1; text-align: center">
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            编号
          </div>
          <div style="width: 35%; border-right: 1px solid #000; padding: 2px">
            物料名称
          </div>
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            规格型号
          </div>
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            数量
          </div>
          <div style="width: 20%; padding: 2px">备注</div>
        </div>
      </div>
      <div
        v-for="(cItem, index) in productFrom.mxDataList"
        :key="index"
        style="display: flex"
        :style="{
          borderBottom:
            index + 1 < productFrom.mxDataList.length ? '1px solid' : '',
        }"
      >
        <div
          style="display: flex; flex: 1; text-align: center; font-size: 12px"
        >
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            {{ cItem.stockGoodsCode }}
          </div>
          <div style="width: 35%; border-right: 1px solid #000; padding: 2px">
            {{ cItem.goodsName }}
          </div>
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            {{ cItem.stockGoodsName }}
          </div>
          <div style="width: 15%; border-right: 1px solid #000; padding: 2px">
            {{ cItem.applyGetQuantity + cItem.goodsUnitName }}
          </div>
          <div style="width: 20%; padding: 2px">
            {{ cItem.getMaterialRemark }}
          </div>
        </div>
      </div>
    </div>
    <div style="margin: 10px 0; line-height: 1.5em; font-size: 12px">
      领料备注:
      <div>
        {{ productFrom.baseData.getMaterialRemark }}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "PrintOrderLL",
  props: {
    productFrom: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      showT: false,
    };
  },
  watch: {
    productFrom: {
      deep: true,
      handler(val) {},
    },
  },
  created() {
  },
  methods: {},
};
</script>

<style>
</style>
